﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;
using QRCodePass.Core.Models;
using QRCodePass.Core.Models.EnumTypes;

namespace QRCodePass.Mvc.ViewModels.Sudent
{
    public class StudentDetailViewModel
    {
        public int Id { get; set; }

        public string Name { get; set; }

        public string Email { get; set; }
        /// <summary>
        /// 主修科目
        /// </summary>
        public MajorEnum? Major { get; set; }
        /// <summary>
        /// 照片路径
        /// </summary>
        public string PhotoPath { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        public string Pwd { get; set; }

        /// <summary>
        /// 宿舍楼栋ID
        /// </summary>
        public int BuildId { get; set; }

        /// <summary>
        /// 楼栋
        /// </summary>
        public string BuildName { get; set; }

        /// <summary>
        /// 所属系部Id
        /// </summary>
        public int DepartmentId { get; set; }

        public string DepartmentName { get; set; }
        /// <summary>
        /// 入学时间
        /// </summary>
        [DataType(DataType.Date)]
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
        public DateTime EnrollmentDate { get; set; }
        /// <summary>
        /// 学号，用来登录
        /// </summary>
        [Required]
        public string StudentNo { get; set; }
        public string MajorName { get; internal set; }
    }
}
